using Handday.Erp.Transfer.Enum;
using System;
using System.ComponentModel.DataAnnotations;

namespace Handday.Erp.Transfer.Models.EightTradingSource
{
    /// <summary>
    /// 新增8项交易源数据dto
    /// </summary>
    public class EightTradingSourceAddDto
    {
        /// <summary>
        /// 企业编号
        /// </summary>
        [Required]
        public ulong CorpId { get; set; }

        /// <summary>
        /// 单据类型:1.销售出库单、2.销售换货单、3.销售退货单
        /// </summary>
        [Required(ErrorMessage = "单据类型:1.销售出库单、2.销售换货单、3.销售退货单必填")]
        public BillTypeEnum BillType { get; set; }

        /// <summary>
        /// 录单时间
        /// </summary>
        [Required(ErrorMessage = "录单时间必填")]
        public DateTimeOffset InputTime { get; set; }

        /// <summary>
        /// 记账时间
        /// </summary>
        [Required(ErrorMessage = "记账时间必填")]
        public DateTimeOffset AccountTime { get; set; }

        /// <summary>
        /// 单据编号
        /// </summary>
        [Required(AllowEmptyStrings = false, ErrorMessage = "单据编号必填")]
        [StringLength(150, ErrorMessage = "单据编号不能超过150个字符")]
        public string BillNO { get; set; }

        /// <summary>
        /// 单据ID
        /// </summary>
        [Required(ErrorMessage = "单据ID必填")]
        public ulong BillId { get; set; }

        /// <summary>
        /// 客户编号
        /// </summary>
        [Required(ErrorMessage = "客户编号必填")]
        public ulong CustomId { get; set; }

        /// <summary>
        /// 客户名称
        /// </summary>
        [Required(AllowEmptyStrings = false, ErrorMessage = "客户名称必填")]
        [StringLength(100, ErrorMessage = "客户名称不能超过100个字符")]
        public string CustomName { get; set; }

        /// <summary>
        /// 价税合计
        /// </summary>
        [Required(ErrorMessage = "价税合计必填")]
        public decimal BillAmount { get; set; }
    }
}
